com.highdeal.pnr.hci
Class SubscriptionSnapshotHolderModel

java.lang.Object
  extended by com.highdeal.pnr.hci.SubscriptionSnapshotHolderModel
All Implemented Interfaces:
XMLMarshallable

public class SubscriptionSnapshotHolderModel
extends java.lang.Object
implements XMLMarshallable

This class represents either the root subscription or a sub-subscription inside a counter snapshot, and contains the list of included counters.

It contains the following information:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="subscriptionSnapshotHolder">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="counter" minOccurs="0" maxOccurs="unbounded" />
       <xs:element ref="subscriptionSnapshotHolder" minOccurs="0" maxOccurs="unbounded" />
       <xs:element ref="chargeSnapshotHolder" minOccurs="0" maxOccurs="unbounded" />
     </xs:sequence>
     <xs:attribute name="code" type="xs:string" />
     <xs:attribute name="lastSnapshotDate" type="xs:dateTime" />
     <xs:attribute name="lastSnapshotDays" type="xs:int" />
     <xs:attribute name="lastExportDate" type="xs:dateTime" />
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String MODEL_NAME
          The name of the object.
 
Constructor Summary
SubscriptionSnapshotHolderModel()
          Builds an empty SubscriptionSnapshotHolderModel object
SubscriptionSnapshotHolderModel(java.lang.String subscriptionCode)
          Builds a SubscriptionSnapshotHolderModel object with a subscription code
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChargeSnapshotHolder(ChargeSnapshotHolderModel chargeSnapshotHolder)
          Adds a charge snapshot holder to the subscription snapshot holder
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void addCounter(CounterModel counter)
          Add a counter to the snapshot holder
 void addSubscriptionSnapshotHolder(SubscriptionSnapshotHolderModel subscriptionsSnapshotHolder)
          Adds a subscription snapshot holder to the subscription snapshot holder
 java.util.List<ChargeSnapshotHolderModel> getChargesSnapshotHolders()
          Gets the list of charge snapshot holders (for charge activations) contained in the snapshot holder.
 java.lang.String getCode()
          Gets the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).
 java.util.List<CounterModel> getCounters()
          Gets the list of counters contained in the snapshot holder.
 java.util.Date getLastExportDate()
          Deprecated. Deprecated since version 2.0 of SAP CC
 java.util.Date getLastSnapshotDate()
          Gets the last snapshot date of the subscription (only for root subscriptions).
 int getLastSnapshotDays()
          Gets the maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).
 java.util.List<SubscriptionSnapshotHolderModel> getSubscriptionsSnapshotHolders()
          Gets the list of subscription snapshot holders (for sub-subscriptions) contained in the snapshot holder.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setChargesSnapshotHolders(java.util.List<ChargeSnapshotHolderModel> chargesSnapshotHolders)
          Sets the list of charge snapshot holders (for charge activations) contained in the snapshot holder.
 void setCode(java.lang.String code)
          Sets the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).
 void setCounters(java.util.List<CounterModel> counters)
          Sets the list of counters contained in the snapshot holder.
 void setLastExportDate(java.util.Date lastExportDate)
          Deprecated. Deprecated since version 2.0 of SAP CC
 void setLastSnapshotDate(java.util.Date lastSnapshotDate)
          Sets the last snapshot date of the subscription (only for root subscriptions).
 void setLastSnapshotDays(int lastSnapshotDays)
          Sets the maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).
 void setSubscriptionsSnapshotHolders(java.util.List<SubscriptionSnapshotHolderModel> subscriptionsSnapshotHolders)
          Sets the list of subscription snapshot holders (for sub-subscriptions) contained in the snapshot holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_NAME

public static final java.lang.String MODEL_NAME
The name of the object.

See Also:
Constant Field Values
Constructor Detail

SubscriptionSnapshotHolderModel

public SubscriptionSnapshotHolderModel()
Builds an empty SubscriptionSnapshotHolderModel object


SubscriptionSnapshotHolderModel

public SubscriptionSnapshotHolderModel(java.lang.String subscriptionCode)
Builds a SubscriptionSnapshotHolderModel object with a subscription code

Parameters:
subscriptionCode - The code of a subscription
Method Detail

getCode

public java.lang.String getCode()
Gets the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).

Returns:
the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions)

setCode

public void setCode(java.lang.String code)
Sets the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions).

Parameters:
code - the code of the associated subscription (for root subscriptions), or the code of the associated offer condition (for sub-subscriptions)

getLastSnapshotDate

public java.util.Date getLastSnapshotDate()
Gets the last snapshot date of the subscription (only for root subscriptions).

Returns:
the last snapshot date of the subscription

setLastSnapshotDate

public void setLastSnapshotDate(java.util.Date lastSnapshotDate)
Sets the last snapshot date of the subscription (only for root subscriptions).

Parameters:
lastSnapshotDate - the last snapshot date of the subscription

getLastSnapshotDays

public int getLastSnapshotDays()
Gets the maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).

Returns:
the maximum number of days in the past for the subscription snapshot holder

setLastSnapshotDays

public void setLastSnapshotDays(int lastSnapshotDays)
Sets the maximum number of days in the past (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot) (only for root subscriptions).

Parameters:
lastSnapshotDays - the maximum number of days in the past for the subscription snapshot holder

getLastExportDate

@Deprecated
public java.util.Date getLastExportDate()
Deprecated. Deprecated since version 2.0 of SAP CC

Gets the last export date of the associated subscription

Returns:
the last export date of the associated subscription

setLastExportDate

@Deprecated
public void setLastExportDate(java.util.Date lastExportDate)
Deprecated. Deprecated since version 2.0 of SAP CC

Sets the last export date of the associated subscription

Parameters:
lastExportDate - the last export date of the associated subscription

getCounters

public java.util.List<CounterModel> getCounters()
Gets the list of counters contained in the snapshot holder.

Returns:
the list of counters contained in the snapshot holder

setCounters

public void setCounters(java.util.List<CounterModel> counters)
Sets the list of counters contained in the snapshot holder.

Parameters:
counters - the list of counters contained in the snapshot holder

addCounter

public void addCounter(CounterModel counter)
Add a counter to the snapshot holder

Parameters:
counter - the counter to add to the snasphot holder

getSubscriptionsSnapshotHolders

public java.util.List<SubscriptionSnapshotHolderModel> getSubscriptionsSnapshotHolders()
Gets the list of subscription snapshot holders (for sub-subscriptions) contained in the snapshot holder.

Returns:
the list of subscription snapshot holders contained in the snapshot holder.

setSubscriptionsSnapshotHolders

public void setSubscriptionsSnapshotHolders(java.util.List<SubscriptionSnapshotHolderModel> subscriptionsSnapshotHolders)
Sets the list of subscription snapshot holders (for sub-subscriptions) contained in the snapshot holder.

Parameters:
subscriptionsSnapshotHolders - the list of subscription snapshot holders contained in the snapshot holder.

addSubscriptionSnapshotHolder

public void addSubscriptionSnapshotHolder(SubscriptionSnapshotHolderModel subscriptionsSnapshotHolder)
Adds a subscription snapshot holder to the subscription snapshot holder

Parameters:
subscriptionsSnapshotHolder - the subscription snapshot holder to add

getChargesSnapshotHolders

public java.util.List<ChargeSnapshotHolderModel> getChargesSnapshotHolders()
Gets the list of charge snapshot holders (for charge activations) contained in the snapshot holder.

Returns:
the list of charge snapshot holders contained in the snapshot holder

setChargesSnapshotHolders

public void setChargesSnapshotHolders(java.util.List<ChargeSnapshotHolderModel> chargesSnapshotHolders)
Sets the list of charge snapshot holders (for charge activations) contained in the snapshot holder.

Parameters:
chargesSnapshotHolders - the list of charge snapshot holders contained in the snapshot holder

addChargeSnapshotHolder

public void addChargeSnapshotHolder(ChargeSnapshotHolderModel chargeSnapshotHolder)
Adds a charge snapshot holder to the subscription snapshot holder

Parameters:
chargeSnapshotHolder - the charge snapshot holder to add

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)